////////////////////////////////////////////////////////////////////////////////
//
//  Copyright (c) 2010 Leon Coto Rodriguez
//  leoncoto@gmail.com
//  
//  Permission is hereby granted, free of charge, to any person
//  obtaining a copy of this software and associated documentation
//  files (the "Software"), to deal in the Software without
//  restriction, including without limitation the rights to use,
//  copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the
//  Software is furnished to do so, subject to the following
//  conditions:
//  
//   The above copyright notice and this permission notice shall be
//   included in all copies or substantial portions of the Software.
//  
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
//  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
//  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
//  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//  OTHER DEALINGS IN THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
package org.flexspeedup.delegate
{
import flash.events.Event;
import flash.events.IEventDispatcher;

import org.flexspeedup.model.IResultSet;
import org.swizframework.core.IDispatcherAware;

/**
 * A blank implementation for <code>ICollectionEditorDelegate</code>
 */
public class CollectionEditorDelegate implements ICollectionEditorDelegate, 
                                                    IEventDispatcher, 
                                                    IDispatcherAware
{

    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of this class.
     */
    public function CollectionEditorDelegate()
    {
    }
    
    //--------------------------------------------------------------------------
    //
    //  Methods - ICollectionEditorDelegate
    //
    //--------------------------------------------------------------------------    

    //----------------------------------
    //  publishItem
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#publishItem
     */
    public function publishItem(item:*):void
    {
    
    } 
     
    //----------------------------------
    //  save
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#save
     */
    public function saveItem(item:*):void
    {
    
    }
    
    //----------------------------------
    //  firstPage
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#firstPage
     * @return void
     */
    public function firstPage():void
    {
    
    } 

    //----------------------------------
    //  nextPage
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#nextPage
     * @void
     */
    public function nextPage():void
    {
    
    } 

    //----------------------------------
    //  previousPage
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#previousPage
     */
    public function previousPage():void
    {
    
    }

    //----------------------------------
    //  createItem
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#createItem
     */
    public function createItem():void
    {
    
    }  

    //----------------------------------
    //  deleteItem
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#deleteItem
     */
    public function deleteItem(item:*):void
    {
    
    } 

    //----------------------------------
    //  editItem
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#editItem
     */
    public function editItem(item:*):void
    {
    
    } 

    //----------------------------------
    //  updateModelFromResultSet
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#updateModelFromResultSet
     */
    public function updateModelFromResultSet(resultSet:IResultSet):void
    {
    
    } 

    //----------------------------------
    //  updateModelFromArray
    //----------------------------------
    /**
     * @inheritDoc org.flexspeedup.delegate.ICollectionEditorDelegate#updateModelFromArray
     */
    public function updateModelFromArray(array:Array):void
    {
    
    } 

    //--------------------------------------------------------------------------
    //
    //  IEventDispatcher implementation for swiz IDispatcher aware
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  _eventDispatcher
    //----------------------------------
    /**
     *  @private
     */
    private var _eventDispatcher:IEventDispatcher;

    //----------------------------------
    //  IDispatcherAware implementation
    //----------------------------------
    /**
     *  @private
     */    
    public function set dispatcher(dispatcher:IEventDispatcher):void
    {
        _eventDispatcher = dispatcher;
    }

    //----------------------------------
    //  IEventDispatcher implementation
    //----------------------------------
    /**
     *  @private
     */
    public function addEventListener(type:String, listener:Function, 
                                        useCapture:Boolean = false, 
                                        priority:int = 0, 
                                        useWeakReference:Boolean = false):void
    {
        _eventDispatcher.addEventListener(type, listener, useCapture, priority);
    }
    
    /**
     *  @private
     */
    public function dispatchEvent(event:Event):Boolean
    {
        return _eventDispatcher.dispatchEvent(event);
    }
    
    /**
     *  @private
     */
    public function hasEventListener(type:String):Boolean
    {
        return _eventDispatcher.hasEventListener(type);
    }
    
    /**
     *  @private
     */
    public function removeEventListener(type:String, listener:Function, 
                                                useCapture:Boolean = false):void
    {
        _eventDispatcher.removeEventListener(type, listener, useCapture);
    }
    
    /**
     *  @private
     */
    public function willTrigger(type:String):Boolean {
        return _eventDispatcher.willTrigger(type);
    }
}
}